const { defineConfig } = require("@vue/cli-service");

// "/dev/users".replace(/^\/dev(.+)/, "$1");
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      // npm run serve:a
      "/a": {
        target: "http://127.0.0.1:3001",
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/a(.+)": "$1",
        },
      },
      //  npm run serve:b
      "/b": {
        target: "http://127.0.0.1:3002",
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/b(.+)": "$1",
        },
      },
    },
  },
});
